package com.bmt.pos.bean;

import com.bmt.core.ISaveable;

public class User implements ISaveable {

	private Integer id;
	private String userName;
	private String staffid;
	private Integer role;
	private Role userRole = Role.UNKNOW;

	public Role getUserRole() {
		return userRole;
	}

	public Integer getRole() {
		return role;
	}

	public void setRole(Integer role) {
		if (role == null)
			role = 0;
		this.role = role;
		userRole = Role.valueOf(this.role);
	}

	public String getStaffid() {
		return staffid;
	}

	public void setStaffid(String staffid) {
		this.staffid = staffid;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	private static String[] KEY_COLUMNS = { "id" };
	private static String TABLE_NAME = "sys_user";

	public String[] _getKeyColumns() {
		return KEY_COLUMNS;
	}

	public String _getTableName() {
		return TABLE_NAME;
	}

}
